<template>
  <div>
    <input :type="type" v-model="form.model[value]" @input="subInput" v-bind="$attrs" >
  </div>

</template>

<script>
  export default {
    inheritAttrs:false,
    props: {
      value: {
        default: '',
        type: String
      },
      type: {
        default: 'text',
        type: String
      },
    },
    inject: ['form'],
    methods: {
      subInput(e) {
        this.$emit("subInput", e.target)
        this.$parent.$emit("validate")
      }
    }
  }
</script>

<style>
</style>
